package org.karelun.gef.model;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;

public abstract class Element implements Cloneable, Serializable {

	private static final long serialVersionUID = 12345678;

	PropertyChangeSupport support;

	public Element() {
		support = new PropertyChangeSupport(this);
	}

	public void addPropertyChangeListener(PropertyChangeListener listener) {
		support.addPropertyChangeListener(listener);
	}

	public void removePropertyChangeListener(PropertyChangeListener listener) {
		support.removePropertyChangeListener(listener);
	}

	protected void firePropertyChange(String prop, Object old, Object newValue) {
		support.firePropertyChange(prop, old, newValue);
	}

//	 protected void fireStructureChange(String prop, Object child) {
//		support.firePropertyChange(prop, null, child);
//	}

}